home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2003 March / DPPCPRO0303.ISO / Components / Microsoft ASP / _SETUP.1 / ASPWizard.jar / asp / netobjects / nfx / ui / AwtUtil.class (.txt) next >
Encoding:
Java Class File  |  1998-11-20  |  1.1 KB  |  24 lines

  1. package asp.netobjects.nfx.ui;
  2.  
  3. import java.awt.Component;
  4. import java.awt.Container;
  5. import java.awt.GridBagConstraints;
  6. import java.awt.GridBagLayout;
  7.  
  8. public class AwtUtil {
  9.    private AwtUtil() {
  10.    }
  11.  
  12.    public static void addComponent(Container cont, Component comp, GridBagLayout gbl, GridBagConstraints gbc, int x, int y, int width, int height, double weightx, double weighty) {
  13.       if (gbl == cont.getLayout()) {
  14.          gbc.gridx = x;
  15.          gbc.gridy = y;
  16.          gbc.gridwidth = width;
  17.          gbc.gridheight = height;
  18.          gbc.weightx = weightx;
  19.          gbc.weighty = weighty;
  20.          cont.add(comp, gbc);
  21.       }
  22.    }
  23. }
  24.